﻿<%@ Page Title="" Language="C#" Theme="Default_Themes" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="TruyVanDoanVien.aspx.cs" Inherits="DanhMuc_TruyVanDoanVien" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="udt" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pncontent" runat="server">
             <div class="row-fluid">
                <div class="span12">
                    <div class="box" style="border:1px solid #B6D1F2;" >
                        <div class="box-title">
                            <h3><i class="icon-file"></i>Truy vấn thông tin đoàn viên</h3>
                            <div class="box-tool">
                                <a data-action="collapse" href="#"><i class="icon-chevron-up"></i></a>
                                <a data-action="close" href="#"><i class="icon-remove"></i></a>
                            </div>
                        </div>
                        <div class="box-content">
                            <div style="text-align:right;padding-bottom:10px;">
                                <asp:Label ID="lbltitlecsd" runat="server" Text="Cơ sở đoàn&nbsp;&nbsp;"></asp:Label>
                                <asp:DropDownList ID="drlcosodoan" runat="server" CssClass="dropdownformatpixel1" AutoPostBack="true" OnSelectedIndexChanged="drlcosodoan_OnSelectedIndexChanged"></asp:DropDownList>&nbsp;&nbsp;
                                <asp:Label ID="lbltitledoancoso" runat="server" Text="Đoàn/chi đoàn cơ sở&nbsp;&nbsp;"></asp:Label>
                                <asp:DropDownList ID="drldoancoso" Enabled="false" OnSelectedIndexChanged="drldoancoso_OnSelectedIndexChanged" runat="server" AutoPostBack="true" CssClass="dropdownformatpixel1"></asp:DropDownList>&nbsp;&nbsp;
                                <asp:Label ID="lblchidoan" runat="server" Text="Chi đoàn&nbsp;&nbsp;"></asp:Label>
                                <asp:DropDownList ID="drlchidoan" Enabled="false" runat="server" CssClass="dropdownformatpixel1"></asp:DropDownList>&nbsp;&nbsp;
                                <asp:Button ID="btntruyvan" class="btn btn-info" runat="server" Text="Tìm kiếm" Width="120px" OnClick="btntruyvan_Click" />&nbsp;&nbsp;
                                <asp:Button ID="btnexport" class="btn btn-inverse" runat="server" Text="Xuất danh sách" Width="120px" OnClick="btnexport_Click" />
                            </div>
                            <div class="dataTables_wrapper form-inline" role="grid">
                                <div class="row-fluid">
                                    <div id="dvScreenWidth" visible="false"></div> <!--Thanh cuon ngang-->
                                    <div class="GridDock" id="dvGridWidth"> <!--Thanh cuon ngang-->
                                        <asp:GridView ID="grid_truyvandoanvien" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" Width="100%" CellPadding="4" ForeColor="#333333" GridLines="None" Style="margin-top: 0px" DataKeyNames="MaDoanVien" OnRowDataBound="grid_truyvandoanvien_RowDataBound" OnRowDeleting="grid_truyvandoanvien_RowDeleting" PageSize="20">
                                            <AlternatingRowStyle BackColor="White" />
                                            <Columns>
                                                <asp:TemplateField HeaderText="Chọn ">
                                                    <HeaderTemplate>
                                                        <asp:CheckBox ID="chkselectAll" runat="server" OnCheckedChanged="chkInGridviewHeader_CheckedChanged" AutoPostBack="true" />
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="chkchon" Enabled="true" Checked="false" runat="server" />
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Mã đoàn viên">
                                                    <ItemTemplate>
                                                        <asp:Label runat="server" Visible="false" ID="lblMaDoanVien" Text='<%#Eval("MaDoanVien") %>'></asp:Label>
                                                        <a href="JavaScript:newPopup('/DanhMuc/LichSuDoanVien.aspx?id=<%#_ps.Encrypt(Eval("MaDoanVien").ToString(),"gold",128)%>');"><%#Eval("MaDoanVien") %></a>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Số Thẻ Đoàn">
                                                    <ItemTemplate>
                                                        <%#Eval("SoTheDoan") %>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Tên đoàn viên">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblTenDoanVien" runat="server" Text='<%#Eval("TenDoanVien") %>'></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Left" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Tên đơn vị">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblTenDonVi" runat="server" Text='<%#Eval("TenDonVi") %>'></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Left" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Phái">
                                                    <ItemTemplate>
                                                        <%#Eval("Phai") %>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Ngày sinh">
                                                    <ItemTemplate>
                                                        <%#Eval("NgaySinh") %>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="CMND">
                                                    <ItemTemplate>
                                                        <%#Eval("CMND") %>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Xem chi tiết">
                                                    <ItemTemplate>
                                                        <asp:LinkButton ID="LinkButtonDetail" runat="server" CausesValidation="false" CommandName="Delete"
                                                            Text="<i class=icon-file-text-alt></i> Chi tiết"></asp:LinkButton>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Trạng thái">
                                                    <ItemTemplate>
                                                        trang thai o day se hien thi bang hinh anh
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center"/>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Trạng Thái" Visible="False"> <%--them co nay de lay cac gia tri trang thai--%>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lbltrangthai" runat="server" Text=' <%#Eval("TrangThai") %>'></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                            </Columns>
                                            <EditRowStyle BackColor="#2461BF" />
                                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                            <RowStyle BackColor="#EFF3FB" />
                                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                            <SortedAscendingCellStyle BackColor="#F5F7FB" />
                                            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                                            <SortedDescendingCellStyle BackColor="#E9EBEF" />
                                            <SortedDescendingHeaderStyle BackColor="#4870BE" />
                                        </asp:GridView>
                                    </div>
                                    <div style="height:10px;"></div>
                                    <div class="" style="float:right;display:inline-block;width:auto;">
                                        <button class='btn btn-circle btn-success show-tooltip' data-original-title='Đoàn viên'><i class='icon-user'></i></button>&nbsp;<asp:LinkButton ID="linkDoanVien" runat="server" ForeColor="#15b74e" OnClick="linkDoanVien_Click">Đoàn viên</asp:LinkButton>&nbsp;&nbsp;
                                        <button class='btn btn-circle  btn-primary show-tooltip' data-original-title='Đoàn viên trưởng thành'><i class= 'icon-star '></i></button>&nbsp;<asp:LinkButton ID="linkDoanVienTruongThanh" runat="server" ForeColor="#0090ff" OnClick="linkDoanVienTruongThanh_Click">Đoàn viên trưởng thành</asp:LinkButton>&nbsp;&nbsp;
                                        <button class='btn btn-circle btn-warning  show-tooltip' data-original-title='Đoàn viên dự bị'><i class='icon-bookmark-empty'></i></button>&nbsp;<asp:LinkButton ID="linkDoanVienDuBi" runat="server" ForeColor="#ff863d" OnClick="linkDoanVienDuBi_Click">Đoàn viên dự bị</asp:LinkButton>&nbsp;&nbsp;
                                        <button class='btn btn-circle btn-danger  show-tooltip' data-original-title='Đoàn viên bị khai trừ'><i class='icon-cut'></i></button>&nbsp;<asp:LinkButton ID="linkDoanVienBiKhaiTru" runat="server" ForeColor="#fb3838" OnClick="linkDoanVienBiKhaiTru_Click">Đoàn viên bị khai trừ</asp:LinkButton> &nbsp;
                                        <button class='btn btn-circle btn-magenta  show-tooltip' data-original-title='Đoàn viên là cán bộ đoàn'><i class='icon-cog'></i></button>&nbsp;<asp:LinkButton ID="linkcanbodoan" runat="server" ForeColor="#fb3838" OnClick="linkcanbodoan_Click">Đoàn viên là cán bộ đoàn</asp:LinkButton> &nbsp;
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            </asp:Panel>
           <asp:Panel ID="pndetail" runat="server" Visible="false">
               <div class="row-fluid">
                    <div class="span12">
                        <div class="box">
                            <div class="box-title">
                                <h3><i class="icon-file"></i>Thông tin chi tiết đoàn viên</h3>
                                 <div style="float:right;">
                                    <asp:LinkButton ID="btnclose" Visible="true" runat="server" class="btn  btn-danger" OnClick="btnclose_Click"><i class="icon-signout"></i> Đóng</asp:LinkButton>
                                </div>
                            </div>
                            <div class="box-content" style="border:solid 1px;">
                                <div class="row-fluid">
                                    <div class="span6">
                                        <div class="box">
                                            <div class="box-content">
                                                <div class="control-group info">
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Mã đoàn viên</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtMaDoanVien1" runat="server" ReadOnly="true" CssClass="textboxformat" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Họ và tên </label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtHoten1" runat="server" CssClass="textboxformat" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Giới tính </label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtgioitinh" runat="server" CssClass="textboxformat" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Ngày sinh </label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtngaysinh" runat="server" CssClass="textboxformat" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Số CMND</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtCMND" runat="server" CssClass="textboxformat" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Ngày cấp</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtngaycap" runat="server" CssClass="textboxformat" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Nơi cấp</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtNoiCap" runat="server" CssClass="textboxformat" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Nguyên quán</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtNguyenquan" runat="server" CssClass="textboxformat" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Thường trú</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtThuongTru" runat="server" CssClass="textboxformat" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Chổ ở hiện nay</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtHienNay" runat="server" CssClass="textboxformat" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Điện thoại</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtDienthoai" runat="server" CssClass="textboxformat" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Email</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtEmail" runat="server" CssClass="textboxformat" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Dân tộc</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtdantoc" runat="server" CssClass="textboxformat"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Tôn giáo</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txttongiao" runat="server" CssClass="textboxformat"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Hôn nhân</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txthonnhan" runat="server" CssClass="textboxformat"></asp:TextBox>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="span6">
                                        <div class="box">
                                            <div class="box-content">
                                                <div class="control-group info">
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Thành phần gia đình xuất thân</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtXuatthan" runat="server" CssClass="texteareformat" TextMode="MultiLine" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Nghề nghiệp bản thân</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtNghenghiep" runat="server" CssClass="textboxformat" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Mô tả công việc</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtMota" runat="server" CssClass="texteareformat" TextMode="MultiLine" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Địa bàn dân cư</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtDiaBanDanCu" runat="server" CssClass="texteareformat" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Trình độ văn hóa</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txttrinhdo" runat="server" CssClass="textboxformat"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Trình độ chuyên mộn</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txttrinhdochuyenmon" runat="server" CssClass="textboxformat"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Đảng viên</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtdangvien" runat="server" CssClass="textboxformat"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Chức vụ đoàn</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtChucVuDoan" runat="server" CssClass="textboxformat"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Chuyên môn</label>
                                                    <div class="controls">
                                                        <fieldset>
                                                            <legend>Chuyên môn</legend>
                                                            <div style="float:left;text-align:right;width:30%;">
                                                                <div style="height:5px;"></div>
                                                                Bằng cấp 1:
                                                                <div style="height:10px;"></div>
                                                                Bằng cấp 2:
                                                                <div style="height:13px;"></div>
                                                                Ngoại ngữ:
                                                                <div style="height:13px;"></div>
                                                                Tin học:
                                                            </div>
                                                            <div style="float:right;width:68%;">
                                                                <asp:TextBox ID="txtbang1" runat="server" CssClass="textboxformat"></asp:TextBox>
                                                                <div style="height:5px;"></div>
                                                                <asp:TextBox ID="txtbang2" runat="server" CssClass="textboxformat"></asp:TextBox>
                                                                <div style="height:5px;"></div>
                                                                <asp:TextBox ID="txtngoaingu" runat="server" CssClass="textboxformat"></asp:TextBox>
                                                                <div style="height:5px;"></div>
                                                                <asp:TextBox ID="txttinhoc" runat="server" CssClass="textboxformat"></asp:TextBox>
                                                            </div>
                                                        </fieldset>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Tình hình sức khỏe</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtsuckhoe" runat="server" CssClass="textboxformat"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Ngày vào đoàn</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtngayvaodoan" runat="server" CssClass="textboxformat" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <label class="control-label" style="width:150px;padding-right:10px;">Phát triển mới/khác</label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtphattrienmoi" runat="server" CssClass="textboxformat" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <asp:Label ID="lblngaychuyen" runat="server" CssClass="control-label nhan" Text="Ngày chuyển đến"></asp:Label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtngaychuyenden" runat="server" CssClass="textboxformat" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                    <div style="height:5px;"></div>
                                                    <asp:Label ID="lbldonvicu" runat="server" CssClass="control-label nhan" Text="Đơn vị cũ"></asp:Label>
                                                    <div class="controls">
                                                        <asp:TextBox ID="txtDonViCu" runat="server" CssClass="textboxformat" onblur="KiemTraInjection(this);"></asp:TextBox>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
           </asp:Panel>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btntruyvan" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="udtprogress" runat="server" AssociatedUpdatePanelID="udt">
        <ProgressTemplate>
            <div class="progress">
                <img src="../img/ajax-loader.gif" />
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>  
    <script type="text/javascript">
        $(document).ready(function () {
            $('#dvGridWidth').width($('#dvScreenWidth').width());
        });
    </script>
    <script type="text/javascript">
        // Popup window code
        function newPopup(url) {
            popupWindow = window.open(
		    url, 'popUpWindow', 'height=200,width=500,left=50%,top=50%,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=no')
        }
    </script>
    <br><br><br><br><br><br><br><br><br><br><br><br>
    <br><br><br><br><br><br><br><br><br><br><br><br>
</asp:Content>

